home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / complib / dggbal.z / dggbal
Text File  |  1998-10-30  |  5KB  |  133 lines

  1.  
  2.  
  3.  
  4. DDDDGGGGGGGGBBBBAAAALLLL((((3333FFFF))))                                                          DDDDGGGGGGGGBBBBAAAALLLL((((3333FFFF))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      DGGBAL - balance a pair of general real matrices (A,B)
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      SUBROUTINE DGGBAL( JOB, N, A, LDA, B, LDB, ILO, IHI, LSCALE, RSCALE,
  13.                         WORK, INFO )
  14.  
  15.          CHARACTER      JOB
  16.  
  17.          INTEGER        IHI, ILO, INFO, LDA, LDB, N
  18.  
  19.          DOUBLE         PRECISION A( LDA, * ), B( LDB, * ), LSCALE( * ),
  20.                         RSCALE( * ), WORK( * )
  21.  
  22. PPPPUUUURRRRPPPPOOOOSSSSEEEE
  23.      DGGBAL balances a pair of general real matrices (A,B).  This involves,
  24.      first, permuting A and B by similarity transformations to isolate
  25.      eigenvalues in the first 1 to ILO$-$1 and last IHI+1 to N elements on the
  26.      diagonal; and second, applying a diagonal similarity transformation to
  27.      rows and columns ILO to IHI to make the rows and columns as close in norm
  28.      as possible. Both steps are optional.
  29.  
  30.      Balancing may reduce the 1-norm of the matrices, and improve the accuracy
  31.      of the computed eigenvalues and/or eigenvectors in the generalized
  32.      eigenvalue problem A*x = lambda*B*x.
  33.  
  34.  
  35. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  36.      JOB     (input) CHARACTER*1
  37.              Specifies the operations to be performed on A and B:
  38.              = 'N':  none:  simply set ILO = 1, IHI = N, LSCALE(I) = 1.0 and
  39.              RSCALE(I) = 1.0 for i = 1,...,N.  = 'P':  permute only;
  40.              = 'S':  scale only;
  41.              = 'B':  both permute and scale.
  42.  
  43.      N       (input) INTEGER
  44.              The order of the matrices A and B.  N >= 0.
  45.  
  46.      A       (input/output) DOUBLE PRECISION array, dimension (LDA,N)
  47.              On entry, the input matrix A.  On exit,  A is overwritten by the
  48.              balanced matrix.  If JOB = 'N', A is not referenced.
  49.  
  50.      LDA     (input) INTEGER
  51.              The leading dimension of the array A. LDA >= max(1,N).
  52.  
  53.      B       (input/output) DOUBLE PRECISION array, dimension (LDB,N)
  54.              On entry, the input matrix B.  On exit,  B is overwritten by the
  55.              balanced matrix.  If JOB = 'N', B is not referenced.
  56.  
  57.      LDB     (input) INTEGER
  58.              The leading dimension of the array B. LDB >= max(1,N).
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. DDDDGGGGGGGGBBBBAAAALLLL((((3333FFFF))))                                                          DDDDGGGGGGGGBBBBAAAALLLL((((3333FFFF))))
  71.  
  72.  
  73.  
  74.      ILO     (output) INTEGER
  75.              IHI     (output) INTEGER ILO and IHI are set to integers such
  76.              that on exit A(i,j) = 0 and B(i,j) = 0 if i > j and j =
  77.              1,...,ILO-1 or i = IHI+1,...,N.  If JOB = 'N' or 'S', ILO = 1 and
  78.              IHI = N.
  79.  
  80.      LSCALE  (output) DOUBLE PRECISION array, dimension (N)
  81.              Details of the permutations and scaling factors applied to the
  82.              left side of A and B.  If P(j) is the index of the row
  83.              interchanged with row j, and D(j) is the scaling factor applied
  84.              to row j, then LSCALE(j) = P(j)    for J = 1,...,ILO-1 = D(j)
  85.              for J = ILO,...,IHI = P(j)    for J = IHI+1,...,N.  The order in
  86.              which the interchanges are made is N to IHI+1, then 1 to ILO-1.
  87.  
  88.      RSCALE  (output) DOUBLE PRECISION array, dimension (N)
  89.              Details of the permutations and scaling factors applied to the
  90.              right side of A and B.  If P(j) is the index of the column
  91.              interchanged with column j, and D(j) is the scaling factor
  92.              applied to column j, then LSCALE(j) = P(j)    for J = 1,...,ILO-1
  93.              = D(j)    for J = ILO,...,IHI = P(j)    for J = IHI+1,...,N.  The
  94.              order in which the interchanges are made is N to IHI+1, then 1 to
  95.              ILO-1.
  96.  
  97.      WORK    (workspace) DOUBLE PRECISION array, dimension (6*N)
  98.  
  99.      INFO    (output) INTEGER
  100.              = 0:  successful exit
  101.              < 0:  if INFO = -i, the i-th argument had an illegal value.
  102.  
  103. FFFFUUUURRRRTTTTHHHHEEEERRRR DDDDEEEETTTTAAAAIIIILLLLSSSS
  104.      See R.C. WARD, Balancing the generalized eigenvalue problem,
  105.                     SIAM J. Sci. Stat. Comp. 2 (1981), 141-152.
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.